Optimal. Leaf size=85 \[ \frac {(e x)^n}{a e n}+\frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {a+b \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2} d e n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4294, 4290,
3868, 2739, 632, 212} \begin {gather*} \frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {a+b \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{a d e n \sqrt {a^2-b^2}}+\frac {(e x)^n}{a e n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 2739
Rule 3868
Rule 4290
Rule 4294
Rubi steps
\begin {align*} \int \frac {(e x)^{-1+n}}{a+b \csc \left (c+d x^n\right )} \, dx &=\frac {\left (x^{-n} (e x)^n\right ) \int \frac {x^{-1+n}}{a+b \csc \left (c+d x^n\right )} \, dx}{e}\\ &=\frac {\left (x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{a+b \csc (c+d x)} \, dx,x,x^n\right )}{e n}\\ &=\frac {(e x)^n}{a e n}-\frac {\left (x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a \sin (c+d x)}{b}} \, dx,x,x^n\right )}{a e n}\\ &=\frac {(e x)^n}{a e n}-\frac {\left (2 x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{1+\frac {2 a x}{b}+x^2} \, dx,x,\tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a d e n}\\ &=\frac {(e x)^n}{a e n}+\frac {\left (4 x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{-4 \left (1-\frac {a^2}{b^2}\right )-x^2} \, dx,x,\frac {2 a}{b}+2 \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a d e n}\\ &=\frac {(e x)^n}{a e n}+\frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {b \left (\frac {a}{b}+\tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2} d e n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.30, size = 79, normalized size = 0.93 \begin {gather*} \frac {(e x)^n \left (d+c x^{-n}-\frac {2 b x^{-n} \text {ArcTan}\left (\frac {a+b \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}\right )}{a d e n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.20, size = 315, normalized size = 3.71
method | result | size |
risch | \(\frac {x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right ) \pi +i \mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2} \pi +i \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2} \pi -i \mathrm {csgn}\left (i e x \right )^{3} \pi +2 \ln \left (e \right )+2 \ln \left (x \right )\right )}{2}}}{a n}-\frac {2 i \arctan \left (\frac {2 i a \,{\mathrm e}^{i \left (d \,x^{n}+2 c \right )}-2 b \,{\mathrm e}^{i c}}{2 \sqrt {a^{2} {\mathrm e}^{2 i c}-{\mathrm e}^{2 i c} b^{2}}}\right ) e^{n} b \,{\mathrm e}^{\frac {i \left (-\pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+\pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+\pi n \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-\pi n \mathrm {csgn}\left (i e x \right )^{3}+\pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )-\pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}-\pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}+\pi \mathrm {csgn}\left (i e x \right )^{3}+2 c \right )}{2}}}{\sqrt {a^{2} {\mathrm e}^{2 i c}-{\mathrm e}^{2 i c} b^{2}}\, d e n a}\) | \(315\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.22, size = 297, normalized size = 3.49 \begin {gather*} \left [\frac {2 \, {\left (a^{2} - b^{2}\right )} d x^{n} e^{\left (n - 1\right )} + \sqrt {a^{2} - b^{2}} b e^{\left (n - 1\right )} \log \left (\frac {{\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x^{n} + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} a \cos \left (d x^{n} + c\right ) + a^{2} + b^{2} + 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cos \left (d x^{n} + c\right ) + a b\right )} \sin \left (d x^{n} + c\right )}{a^{2} \cos \left (d x^{n} + c\right )^{2} - 2 \, a b \sin \left (d x^{n} + c\right ) - a^{2} - b^{2}}\right )}{2 \, {\left (a^{3} - a b^{2}\right )} d n}, \frac {{\left (a^{2} - b^{2}\right )} d x^{n} e^{\left (n - 1\right )} + \sqrt {-a^{2} + b^{2}} b \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} b \sin \left (d x^{n} + c\right ) + \sqrt {-a^{2} + b^{2}} a}{{\left (a^{2} - b^{2}\right )} \cos \left (d x^{n} + c\right )}\right ) e^{\left (n - 1\right )}}{{\left (a^{3} - a b^{2}\right )} d n}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (e x\right )^{n - 1}}{a + b \csc {\left (c + d x^{n} \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.31, size = 229, normalized size = 2.69 \begin {gather*} \frac {x\,{\left (e\,x\right )}^{n-1}}{a\,n}-\frac {b\,x\,\ln \left (b\,x\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}-\frac {2\,b\,x\,{\left (e\,x\right )}^{n-1}\,\left (a\,1{}\mathrm {i}+b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\right )}{\sqrt {a+b}\,\sqrt {a-b}}\right )\,{\left (e\,x\right )}^{n-1}}{a\,d\,n\,x^n\,\sqrt {a+b}\,\sqrt {a-b}}+\frac {b\,x\,\ln \left (b\,x\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}+\frac {2\,b\,x\,{\left (e\,x\right )}^{n-1}\,\left (a\,1{}\mathrm {i}+b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\right )}{\sqrt {a+b}\,\sqrt {a-b}}\right )\,{\left (e\,x\right )}^{n-1}}{a\,d\,n\,x^n\,\sqrt {a+b}\,\sqrt {a-b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________